/*
-------------------------------------------------------------------------------
This file is part of FlyingPaper.

Copyright (c) 2009-2010 Emilien Dupont
Also see acknowledgements in COPYING.txt

FlyingPaper is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

FlyingPaper is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with FlyingPaper. If not, see <http://www.gnu.org/licenses/>.
-------------------------------------------------------------------------------
*/

/**
 * \file flyingPaper.h
 * \brief FlyingPaper class definition
 * \author Emilien Dupont
 *
 * This file contains the definition of the FlyingPaper class (the game class).
 */

#ifndef FLYINGPAPER_H
#define FLYINGPAPER_H

#include <Ogre.h>
#include <OIS/OIS.h>
#include <CEGUI/CEGUI.h>
#include <OgreCEGUIRenderer.h>
#include <OgreCEGUIResourceProvider.h>

#include "stateManager.h"
#include "state.h"

/**
 * \class FlyingPaper
 *
 * This is the class which initialises and stops the game.
 */
class FlyingPaper
{
	public:
        /**
         * \brief Constructor
         */
		FlyingPaper();
		/**
		 * \brief Destructor
		 */
		~FlyingPaper();

        /**
         * \brief Initialise and start the game
         */
		void start();
		/**
		 * \brief Stop the game
		 */
		void stop();

	protected:
        void initOgre();
        void loadResources();
        void initOIS();
        void initCEGUI();
        void initStates();

        Ogre::Root *_Root;
        Ogre::SceneManager *_SceneManager;
        Ogre::RenderWindow *_RenderWindow;
        Ogre::Viewport *_Viewport;
        Ogre::Camera *_Camera;

        OIS::InputManager *_InputManager;
        OIS::Keyboard *_Keyboard;
        OIS::Mouse *_Mouse;

        CEGUI::OgreCEGUIRenderer *_GUIRenderer;
        CEGUI::System *_GUISystem;

        StateManager *_StateManager;
        State *_MenuState;
        State *_GameState;
        State *_CreditsState;
        State *_GameOverState;
};

#endif // FLYINGPAPER_H
